import logging
import pytest
from selenium.webdriver.common.by import By

from element.public_element import *
from page.page_home import PageHome
from page.page_edit_photo import PageEditPhoto
from page.page_album import PageAlbum

from util.webdriver_factory import GetDriver


class TestCaseMainProcess:

    def setup_class(self) -> None:
        self.driver = GetDriver.get_app_driver()
        self.page_home = PageHome(self.driver)
        self.page_edit_photo = PageEditPhoto(self.driver)
        self.page_album = PageAlbum(self.driver)

    def teardown_class(self) -> None:
        self.driver.quit()

    # 测试用例：点击开始美颜-照片-身体-一键美体-自然
    def testcase_beauty_nature(self):
        self.page_home.click_start_beauty_button()
        self.page_album.select_photo(1)
        self.page_edit_photo.click_body_tab()
        self.page_edit_photo.click_function2_quick_beauty_body()
        self.page_edit_photo.adjust_seekbar(90)

